home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Utilities Experience
/
The Utilities Experience - Volume 1.iso
/
software
/
business
/
mui-rechnung
/
texwork
/
showdvi.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1995-05-14
|
1KB
|
86 lines
/*
** $VER: ShowDVI.rexx 1.0 (14.05.1995)
**
** ©1995 Stefan Scherer
**
** ruft den DVI-Previewer ShowDVI asynchron auf.
** Achtung: Pfad ist nur aktuelles Verzeichnis und "C:"!!
*/
OPTIONS RESULTS
/* lies die Parameter, die normalerweise ShowDVI direkt bekommen würde */
PARSE ARG Parameters
Dummy = WORD(Parameters,1)
IF Dummy = "PUB" THEN
DO
Screen = WORD(Parameters, 2)
File = WORD(Parameters, 3)
END
ELSE
DO
Screen = ""
File = WORD(Parameters, 1)
END
Dir = PRAGMA("DIRECTORY")
If Show('Port','showdvi') == 0 Then
Do
Address COMMAND
say "Starte ShowDVI..."
IF Screen ~= "" THEN
'run >NIL: TeX:bin/showdvi PUB '||Screen||' nolog'
ELSE
'run >NIL: TeX:bin/showdvi nolog'
/* warte bis ShowDVI wirklich läuft */
'SYS:Rexxc/WaitForPort showdvi'
End
If Show('Port','showdvi') Then
Do
Address "showdvi"
Options Results
GetFile
LOADEDFILE = RESULT
GetDir
LOADEDDIR = RESULT
If Right(LOADEDDIR,1)~=':' & Right(LOADEDDIR,1)~='/' THEN
LOADEDDIR = LOADEDDIR||'/'
If Right(Dir,1)~=':' & Right(Dir,1)~='/' THEN
Dir = Dir||'/'
If LOADEDDIR = Dir & 1 = Index(Upper(LOADEDFILE||".dvi"),Upper(File)) Then
Do
Say "Datei in ShowDVI wird erneuert."
LoadAgain
End;
Else
Do
Say "Lade Datei in ShowDVI."
LoadNew Dir||File
End
toFront
Activate
End
Else
Do
Say "Fehler bei ShowDVI aufgetreten!"
End
Exit